package com.demo.entity.po;

import java.io.Serializable;

import java.util.Date;

import com.demo.annotation.VerifyParam;
import com.fasterxml.jackson.annotation.JsonFormat;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * @Description:用户表
 * @Date:2025-03-01
 * @author：author
*/
public class UserInfo implements Serializable {

	/**
	 * 用户ID，主键，自增
	 */
	private Long userId;

	/**
	 * 用户名，唯一
	 */
	@VerifyParam(required = true)
	private String username;

	/**
	 * 密码（加密存储）
	 */
	private String password;

	/**
	 * 邮箱，唯一
	 */
	@VerifyParam(required = true)
	private String email;

	/**
	 * 手机号，唯一
	 */
	private String phone;

	/**
	 * 用户角色：普通用户、咨询师、管理员
	 */
	private Integer role;

	/**
	 * 头像URL
	 */
	private String avatar;

	/**
	 * 性别 0 女 1男
	 */
	private Integer gender;

	/**
	 * 出生日期
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date bitrhday;

	/**
	 * 注册时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 最后更新时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	/**
	 * 用户状态：1正常、2未激活、0封禁
	 */
	private Integer status;

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getUserId() {
		return this.userId;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return this.username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return this.password;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return this.email;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	public Integer getRole() {
		return this.role;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getAvatar() {
		return this.avatar;
	}

	public void setGender(Integer gender) {
		this.gender = gender;
	}

	public Integer getGender() {
		return this.gender;
	}

	public void setBitrhday(Date bitrhday) {
		this.bitrhday = bitrhday;
	}

	public Date getBitrhday() {
		return this.bitrhday;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return this.status;
	}

	@Override
	public String toString() {
		return "用户ID，主键，自增:" + userId + ",用户名，唯一:" + username + ",密码（加密存储）:" + password + ",邮箱，唯一:" + email + ",手机号，唯一:" + phone + ",用户角色：普通用户、咨询师、管理员:" + role + ",头像URL:" + avatar + ",性别 0 女 1男:" + gender + ",出生日期:" + bitrhday + ",注册时间:" + createTime + ",最后更新时间:" + updateTime + ",用户状态：1正常、2未激活、0封禁:" + status + "";
	}

}